package org.example.blog.service.Impl;

import org.example.blog.mapper.CategoryMapper;
import org.example.blog.service.CategoryService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {

    private final CategoryMapper categoryMapper;

    public CategoryServiceImpl(CategoryMapper categoryMapper) {
        this.categoryMapper = categoryMapper;
    }

    /**
     * 查询所有分类的名称
     * @return 分类名称列表
     */
    @Override
    public List<String> findAllCategoryName() {
        return categoryMapper.findAllCategoryName();
    }
}
